home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UNIXTOOL
/
GNU
/
PERL
/
PERL5SRC.ZIP
/
!Perl
/
sys
/
h
/
Stat
Wrap
Text File
|
1995-06-26
|
2KB
|
55 lines
/* H.Stat: Header file for stat call (Specialised version for Perl) */
#ifndef __sys_stat_h
#define __sys_stat_h
#endif
#include <time.h>
struct stat
{
unsigned int st_dev;
unsigned int st_ino;
unsigned short st_mode; /* mode bits */
short st_nlink; /* number of links to file */
short st_uid; /* user id of owner ( = 0 ) */
short st_gid; /* group id of owner ( = 0 ) */
unsigned int st_size; /* file size in characters */
time_t st_mtime; /* time file last written or created */
int st_type; /* file type (file/directory) */
int st_ftype; /* file type (-1 if unstamped) */
int st_load; /* load address */
int st_exec; /* execution address */
int st_length; /* file size in bytes */
int st_attr; /* file attributes */
double st_time; /* time stamp (0 if unstamped) */
time_t st_utime; /* time stamp in Unix format */
};
/* File types */
#define T_FILE 1 /* Plain file */
#define T_DIRECTORY 2 /* Directory */
/* File attribute bits */
/* Parts of st_mode field */
#define S_IFMT 0170000 /* type of file */
#define S_IFDIR 0040000 /* directory */
#define S_IFREG 0100000 /* regular */
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute permission, owner */
#define S_IFCHR 0000000
/* Parts of st_attribs field */
#define S_READ 0x01 /* Read access for user */
#define S_WRITE 0x02 /* Write access for user */
#define S_LOCK 0x08 /* File is locked */
#define S_PREAD 0x10 /* Public read access */
#define S_PWRITE 0x20 /* Public write access */
extern int stat (char *name, struct stat *buf);